<?php defined('_JEXEC') or die('Restricted access'); ?>

<section id="search-results" class="contentpaneopen<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
	<?php foreach( $this->results as $result ) : ?>
		<article class="result rounded">
			<header>
				<span class="rank small<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
					<?php echo $this->pagination->limitstart + $result->count.'. ';?>
				</span>
				<?php if ( $result->href ) :
					if ($result->browsernav == 1 ) : ?>
					<a class="title" href="<?php echo JRoute::_($result->href); ?>" target="_blank">
					<?php else : ?>
					<a class="title" href="<?php echo JRoute::_($result->href); ?>">
					<?php endif;

					echo $this->escape($result->title);

					if ( $result->href ) : ?>
						</a>
					<?php endif;
					if ( $result->section ) : ?>
					<span class="section" class="small<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
						(<?php echo $this->escape($result->section); ?>)
					</span>
					<?php endif; ?>
				<?php endif; ?>
			</header>
			<div class="result-text">
				<?php echo $result->text; ?>
			</div>
			<?php if ( $this->params->get( 'show_date' )) : ?>
			<footer class="createdate small<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
				<?php echo $result->created; ?>
			</footer>
			<?php endif; ?>
		</article>
	<?php endforeach; ?>
</section>
<section class="pagination">
	<?php echo $this->pagination->getPagesLinks( ); ?>
</section>

